﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AdministrarDesempenos.ascx.cs"
    Inherits="AP.LUNA.Shell.Views.AdministrarDesempenos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<%@ Register src="AdministrarDesempenosComprension.ascx" tagname="AdministrarDesempenosComprension" tagprefix="uc1" %>
<div class="page-header">
    <h3>
        Administrar Desempeños
    </h3>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
            <asp:View ID="View1" runat="server">
                <table align="center" width="70%">
                    <tr>
                        <td>
                            <asp:GridView ID="gvAsignaturas" Width="100%" runat="server" DataKeyNames="Id" OnRowCommand="GridView1_RowCommand">
                                <Columns>
                                    <asp:BoundField HeaderText="Id" DataField="Id" />
                                    <asp:BoundField HeaderText="Asignatura" DataField="Nombre_Asignatura" />
                                    <asp:BoundField HeaderText="Curso" DataField="Grado" />
                                    <asp:TemplateField FooterStyle-HorizontalAlign="Left">
                                        <ItemTemplate>
                                            <asp:LinkButton runat="server" CssClass="link" CommandName="Temas" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                                                ID="lkbTemas" Text="Programar Temas"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterStyle-HorizontalAlign="Left">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lkbDesempenos" CssClass="link" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                                                runat="server" CommandName="Desempeno" Text="Programar Desempeños de Comprensión"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </asp:View>
            <asp:View ID="View2" runat="server">
                <table align="center" width="70%">
                    <tr>
                        <td>
                            <asp:GridView ID="gvDesempenos" Width="100%" runat="server" DataKeyNames="Id" OnRowCommand="gvDesempenos_RowCommand"
                                ShowFooter="True">
                                <Columns>
                                    <asp:BoundField HeaderText="Descripción" DataField="Descripcion" />
                                    <asp:BoundField HeaderText="Periodo" DataField="NombrePeriodo" />
                                    <asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeMostrar" />
                                    <asp:TemplateField FooterStyle-HorizontalAlign="Left">
                                        <ItemTemplate>
                                            <asp:LinkButton runat="server" CssClass="link" CommandName="Editar" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                                                ID="lkbEditar" Text="Editar"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterStyle-HorizontalAlign="Left">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lkbEliminar" CssClass="link" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
                                                runat="server" CommandName="Eliminar" Text="Eliminar"></asp:LinkButton>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:LinkButton ID="lkbNuevo" runat="server" CommandName="Nuevo" Text="Nuevo"></asp:LinkButton>
                                        </FooterTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <EmptyDataTemplate>
                                    <asp:Label ID="lbMensaje" Width="100%" Text="No existen temas registrados" CssClass="alert alert-danger"
                                        runat="server"></asp:Label>
                                    <asp:LinkButton ID="lkbNuevo" runat="server" CommandName="Nuevo" Text="Nuevo"></asp:LinkButton>
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:LinkButton ID="lkbVolver" runat="server" Text="Volver" OnClick="lkbVolver_Click"></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </asp:View>
            <asp:View ID="View3" runat="server">
                <table align="center" width="95%">
                    <tr>
                        <td>
                            <table width="60%" align="center" class="tabla">
                                <tr>
                                    <td align="center" colspan="3">
                                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="Guardar" />
                                    </td>
                                    <tr>
                                        <td align="left" width="25%">
                                            <asp:Label ID="Label1" runat="server" Text="Descripción"></asp:Label>
                                        </td>
                                        <td align="left" width="70%">
                                            <asp:TextBox ID="txtTema" runat="server" Width="90%"></asp:TextBox>
                                        </td>
                                        <td align="left">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtTema"
                                                ErrorMessage="Debe diliigenciar el Tema" ValidationGroup="Guardar">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" width="25%">
                                            <asp:Label ID="Label3" runat="server" Text="Periodo"></asp:Label>
                                        </td>
                                        <td align="left">
                                            <asp:DropDownList ID="ddlPeriodo" runat="server" DataTextField="Descripcion" DataValueField="Id"
                                                Width="90%">
                                            </asp:DropDownList>
                                        </td>
                                        <td align="left">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlPeriodo"
                                                ErrorMessage="Debe seleccionar el periodo" InitialValue="-1" ValidationGroup="Guardar">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" width="25%">
                                            <asp:Label ID="Label2" runat="server" Text="Porcentaje"></asp:Label>
                                        </td>
                                        <td align="left">
                                            <asp:TextBox ID="txtPorcentaje" runat="server" Width="20%"></asp:TextBox>
                                            <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers"
                                                TargetControlID="txtPorcentaje">
                                            </asp:FilteredTextBoxExtender>
                                        </td>
                                        <td align="left">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPorcentaje"
                                                ErrorMessage="Debe diligenciar el porcentaje" ValidationGroup="Guardar">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" colspan="3">
                                            <br />
                                            <asp:LinkButton ID="lkbNuevo" runat="server">Nuevo</asp:LinkButton>
                                            <asp:LinkButton ID="lkbGuardar" runat="server" ValidationGroup="Guardar" OnClick="lkbGuardar_Click">Guardar</asp:LinkButton>
                                            <asp:LinkButton ID="lkbCancelar" runat="server" OnClick="lkbCancelar_Click">Volver</asp:LinkButton>
                                        </td>
                                    </tr>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </asp:View>
            <asp:View ID="View4" runat="server">
                <uc1:AdministrarDesempenosComprension ID="AdministrarDesempenosComprension1" 
                    runat="server" OnClickVolver="AdministrarDesempenosComprension1_OnClickVolver" />
            </asp:View>
        </asp:MultiView>
    </ContentTemplate>
</asp:UpdatePanel>
